﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Infrastructure;
using DormMS.Model;
using DormMS.Model.SearchModels;
using DormMS.Model.ViewModels;

namespace DormMS.IService
{
    public interface IProductService
    {
        List<ProductResponse> ProductManage(ProductSearchModel search, out int total);
        List<SpecResponse> GetProductSpecLsit(ProductSearchModel search, ref int total);

        List<Product_SpecType> GetProductSpecType();
        ProductEditResponse ProductEdit(string Sku);

        GetFreightInfoResponse GetFreightInfo(int Id);

        SpecTypeChangeResponse ChangeSpecType(string Sku, int specTypeId);

        ChooseSpecItemResponse ChooseSpecItem(string Sku, List<Product_SpecTemplateItem> chooseSpecItemList);

        Result ProductEditSubmit(ProductInfo ProductMain, List<SpecResponse> SpecList, int currentUserId, string ip);

        Result DelProduct(string Sku, int currentUserId, string ip);

        Result ChangeDisplay(string Sku, int currentUserId, string ip);

        List<V_Product_Comment> CommentManage(ProductCommetSearchModel search, out int total);

        Result CommentReply(Product_Comment comment, int currentUserId);

        Result DelComment(int Id, int currentUserId);

        ProductDetailResponse ProductDetail(string Sku,int ActivityId, int currentMemberId);

        SpecResponse GetProduct_SpecInfo(int id);

        List<ProductCommentInfo> CommentList(int Skip, int Take, string Sku, out int total);

        bool ProductFavorite(string Sku, int currentMemberId);

        int AddShopCart(string Sku, int SpecId, int Num,int currentMemberId);

        List<CartProduct> ShopCartList(int currentMemberId);
        List<CartProduct> GetShopCartList(string CartIds);

        Result ChangeShopCartNum(int Id, int Num, int currentMemberId);

        Result DelCart(int Id, int currentMemberId);

        List<Member_Favorite> GetMyFavorite(int Skip, int Take, int currentMemberId, out int total);

        Result CancelFavorite(int Id, int currentMemberId);

        List<Product> ProductList(WapProductSearchModel search, out int total);

        List<Product> ProductSelect(ProductSearchModel search, out int total);

        Member_ShopCart GetMember_ShopCart(int id);
        bool DelCart(List<Member_ShopCart> list);

        List<AddCommentResponse> GetOrderComment(int orderId);

        Result OrderCommentSubmit(List<AddCommentResponse> comments, int orderId,int currentMemberId,string ip);


        /// <summary>
        /// 统计待上架的商品
        /// </summary>
        /// <returns></returns>
        int GetStatisticsLower();


        /// <summary>
        /// 统计销售中的商品
        /// </summary>
        /// <returns></returns>
        int GetStatisticsUpper();


        /// <summary>
        /// 获取库存不足的商品
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int GetStocNotEnoughk();


        int GetStockEmpty();


        Result UpdateProductArea(List<string> AidList, int ProductId, int userId);
        bool IsCanBuy(int cityId, int productId);

    }
}
